export const lineOptions = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      name: 'a',
      type: 'line',
      smooth: true,
      data: [10, 932, 901, 934, 1290, 1330, 1500]
    },
    {
      name: 'b',
      type: 'line',
      smooth: true,
      data: [820, 932, 100, 934, 1290, 1330, 40]
    },
    {
      name: 'c',
      type: 'line',
      smooth: true,
      data: [820, 500, 901, 934, 1290, 1330, 800]
    }
  ]
}

export const pieOptions = {
  tooltip: {
    trigger: 'item'
  },
  legend: {
    top: '5%',
    left: 'center'
  },
  series: [
    {
      name: '访问来源',
      type: 'pie',
      radius: ['40%', '70%'],
      avoidLabelOverlap: false,
      label: {
        show: false,
        position: 'center'
      },
      emphasis: {
        label: {
          show: true,
          fontSize: '40',
          fontWeight: 'bold'
        }
      },
      labelLine: {
        show: false
      },
      data: [
        { value: 1048, name: '搜索引擎' },
        { value: 735, name: '直接访问' },
        { value: 580, name: '邮件营销' },
        { value: 484, name: '联盟广告' },
        { value: 300, name: '视频广告' }
      ]
    }
  ]
}

export const radarOptions = {
  normal: {
    top: 200,
    left: 300,
    width: 500,
    height: 400,
    zIndex: 6,
    backgroundColor: ''
  },
  title: {
    show: true,
    left: '40%',
    top: '1%',
    textStyle: {
      fontSize: 18,
      color: '#fff',
      fontStyle: 'normal',
      fontWeight: 'normal'
    }
  },
  tooltip: {
    show: true,
    trigger: 'item'
  },
  radar: {
    center: ['50%', '50%'],
    radius: '70%',
    startAngle: 90,
    splitNumber: 4,
    shape: 'circle',
    axisLabel: {
      show: true,
      fontSize: 12,
      color: '#0ab3f0'
    },
    axisLine: {
      show: true,
      lineStyle: {
        type: 'dashed',
        color: '#0ab3f0',
        width: 1.5 //
      }
    },
    splitLine: {
      show: true,
      lineStyle: {
        color: '#0ab3f0',
        width: 2 //
      }
    },
    indicator: [
      {
        name: 'N[0]',
        max: 88
      },
      {
        name: '',
        max: 88
      },
      {
        name: 'W[270]',
        max: 88
      },
      {
        name: '',
        max: 88
      },
      {
        name: 'S[180]',
        max: 88
      },
      {
        name: '',
        max: 88
      },
      {
        name: 'E[90]',
        max: 88
      },
      {
        name: '',
        max: 88
      }
    ]
  },
  series: [
    {
      name: '卫星坐标',
      type: 'radar',
      symbol: 'circle',
      symbolSize: 20,
      itemStyle: {
        normal: {
          color: 'rgba(255, 0, 0, 1)',
          borderColor: 'rgba(255, 0, 0, 0.4)',
          borderWidth: 20
        }
      },
      areaStyle: {
        normal: {
          color: 'rgba(19, 173, 255, 0)'
        }
      },
      lineStyle: {
        normal: {
          color: 'rgba(19, 173, 255, 0)',
          width: 2,
          type: 'dashed'
        }
      },
      data: [[60, 10, 20, 50, 60, 90, 60, 60]]
    }
  ]
}

export const scatterOptions = {
  xAxis: {},
  yAxis: {},
  series: [
    {
      symbolSize: 20,
      data: [
        [10.0, 8.04],
        [8.07, 6.95],
        [13.0, 7.58],
        [9.05, 8.81],
        [11.0, 8.33],
        [14.0, 7.66],
        [13.4, 6.81],
        [10.0, 6.33],
        [14.0, 8.96],
        [12.5, 6.82],
        [9.15, 7.2],
        [11.5, 7.2],
        [3.03, 4.23],
        [12.2, 7.83],
        [2.02, 4.47],
        [1.05, 3.33],
        [4.05, 4.96],
        [6.03, 7.24],
        [12.0, 6.26],
        [12.0, 8.84],
        [7.08, 5.82],
        [5.02, 5.68]
      ],
      type: 'scatter'
    }
  ]
}

export const candlestickOptions = {
  xAxis: {
    data: ['2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27']
  },
  yAxis: {},
  series: [
    {
      type: 'k',
      data: [
        [20, 34, 10, 38],
        [40, 35, 30, 50],
        [31, 38, 33, 44],
        [38, 15, 5, 42]
      ]
    }
  ]
}
